GXGetShapePattern
You can use theGXGetShapePattern
function to retrieve the pattern information from the style object associated with a particular shape.
gxPatternRecord *GXGetShapePattern(gxShape source, gxPatternRecord *pattern);
source
- The shape whose pattern information you want to retrieve.
pattern
- A pointer to a
gxPatternRecord
structure. On return, this structure contains the pattern information for the source shape.- function result
- A copy of the
gxPatternRecord
structure associated with the
source shape's style object.DESCRIPTION
TheGXGetShapePattern
function returns as its function result and in thepattern
parameter a pointer to agxPatternRecord
structure containing the pattern information for the style object of the shape specified by thesource
parameter.This function creates a new shape to encapsulate the pattern geometry, and places a reference to this shape in the
pattern
field of the returnedgxPatternRecord
structure. You should dispose of this shape when you no longer need it.Since this function copies the pattern information from the source shape's style, you may make changes to the
gxPatternRecord
structure returned by this function without affecting the source shape's pattern. If you want to change the pattern information for the source shape, you must use theGXSetShapePattern
function.SPECIAL CONSIDERATIONS
TheGXGetShapePattern
function may create a shape; you are responsible for disposing of this shape when you no longer need it. See Inside Macintosh: QuickDraw GX Objects for information about creating and disposing of objects.ERRORS, WARNINGS, AND NOTICES
Errors out_of_memory shape_is_nil parameter_is_nil SEE ALSO
For a discussion of patterns, see "Patterns" on page 3-31.For examples of adding patterns to shapes, see page 3-86 through page 3-91.
For a discussion of the
gxPatternRecord
structure and a description of what types of shapes you can use as pattern shapes, see "The Pattern Structure" on page 3-106.To retrieve pattern information from a style object, use the
GXGetStylePattern
function, which is described on page 3-142. To specify pattern information for a style object, use theGXSetStylePattern
function, which is described on page 3-144.To specify pattern information for a style object associated with a particular shape, use the
GXSetShapePattern
function, which is described in the next section.To determine where pattern shapes are drawn for a particular shape, use the
GXGetShapePatternPositions
function, which is described on page 3-147.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help